package cn.yzgy.yzgyoa.common.entity;

import cn.yzgy.yzgyoa.common.utils.JsonLongSerializer;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author Yqsen
 * @since 2021-11-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_file_info")
public class SysFileInfo extends Model<SysFileInfo> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "file_id", type = IdType.INPUT)
    @JsonSerialize(using = JsonLongSerializer.class )
    private Long fileId;

    /**
     * 业务Id (入出账id  合同管理Id)
     */
    private Long busiId;

    /**
     * 文件大小
     */
    private String fileSize;

    /**
     * 文件路径
     */
    private String filePath;

    /**
     * 文件名
     */
    private String fileName;

    /**
     * 备注
     */
    private String comment;

    /**
     * 操作时间
     */
    private LocalDateTime createTime;

    /**
     * 操作人
     */
    private Long createBy;


    @Override
    protected Serializable pkVal() {
        return this.fileId;
    }

}
